{% extends 'base.html' %}

{% block extracss %}
<!-- Bootstrap table -->
<link href="{{ url_for('static', filename='bootstrap-table/dist/bootstrap-table.css', _external=True) }}" rel="stylesheet">
{% endblock %}

{% block title %}
<title>SWAMP_TABLE</title>
{% endblock %}

{% block content %}
<div class="panel-body col-*-12" style="padding-bottom:0;">
  <div id="toolbar" class="btn-group">
    <button id="btn_add" type="button" class="btn btn-default" data-toggle="modal" data-target="#addModal">
      <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
    </button>
    <button id="btn_edit" type="button" class="btn btn-default" onclick="return get_edit_info()" data-toggle="modal" data-target="#alterModal">
      <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>修改
    </button>
    <button id="btn_delete" type="button" class="btn btn-default" onclick="return delete_info()">
      <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除
    </button>
  </div>
  <table id="tb_departments" class="table-bordered table-condensed table-striped table-responsive table-hover"></table>

</div>

<!-- 模态框（Modal）新增 -->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog" >
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
          &times;
        </button>
        <h4 class="modal-title" id="myaddModalLabel">添加新脚本数据</h4>
      </div>
      <div class="modal-body">
        <form class="form-horizontal" role="form">
          <div class="row">
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_custom_name">自定义平台名称</label>
              <div class="col-sm-10">
                <input type="text" class="form-control " id="id_custom_name" placeholder="自定义平台名称">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_server_ip">服务器IP</label>
              <div class="col-sm-4">
                <input type="text" class="form-control " id="id_server_ip" placeholder="服务器IP">
              </div>
              <label class="col-sm-2 control-label clear-padding-row" for="id_server_port">服务器端口</label>
              <div class="col-sm-4">
                <input type="text" class="form-control " id="id_server_port" placeholder="服务器端口">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_server_user">服务器用户名</label>
              <div class="col-sm-4">
                <input type="text" class="form-control " id="id_server_user" placeholder="服务器用户名">
              </div>
              <label class="col-sm-2 control-label clear-padding-row" for="id_server_password">服务器密码</label>
              <div class="col-sm-4">
                <input type="text" class="form-control " id="id_server_password" placeholder="服务器密码">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_scripts_path">脚本所在路径</label>
              <div class="col-sm-10">
                <input type="text" class="form-control -row" id="id_scripts_path" placeholder="脚本所在路径">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_scripts_name">脚本名</label>
              <div class="col-sm-10">
                <input type="text" class="form-control " id="id_scripts_name" placeholder="脚本名">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_scripts_log">脚本日志文件</label>
              <div class="col-sm-10">
                <input type="text" class="form-control " id="id_scripts_log" placeholder="脚本日志文件">
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="addRecord" data-dismiss="modal">提交新增</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal -->
</div>

<!-- 模态框（Modal）修改 -->
<div class="modal fade" id="alterModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
          &times;
        </button>
        <h4 class="modal-title" id="myalterModalLabel">
          修改脚本数据
        </h4>
      </div>
      <div class="modal-body">
        <form class="form-horizontal" role="form" action="javascript:void(0)">
          <div class="row">
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_custom_name0">自定义平台名称</label>
              <div class="col-sm-8">
                <input type="text" class="form-control " id="id_custom_name0" placeholder="自定义平台名称">
              </div>
              <!--<label class="col-sm-1 control-label clear-padding-row" for="id_id0">ID</label>-->
              <div class="col-sm-2">
                <input type="text" class="form-control " id="id_id0" placeholder="ID" disabled="disabled">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_server_ip0">服务器IP</label>
              <div class="col-sm-4">
                <input type="text" class="form-control " id="id_server_ip0" placeholder="服务器IP">
              </div>
              <label class="col-sm-2 control-label clear-padding-row" for="id_server_port0">服务器端口</label>
              <div class="col-sm-4">
                <input type="text" class="form-control " id="id_server_port0" placeholder="服务器端口">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_server_user0">服务器用户名</label>
              <div class="col-sm-4">
                <input type="text" class="form-control " id="id_server_user0" placeholder="服务器用户名">
              </div>
              <label class="col-sm-2 control-label clear-padding-row" for="id_server_password0">服务器密码</label>
              <div class="col-sm-4">
                <input type="text" class="form-control " id="id_server_password0" placeholder="服务器密码">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_scripts_path0">脚本所在路径</label>
              <div class="col-sm-10">
                <input type="text" class="form-control -row" id="id_scripts_path0" placeholder="脚本所在路径">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_scripts_name0">脚本名</label>
              <div class="col-sm-10">
                <input type="text" class="form-control " id="id_scripts_name0" placeholder="脚本名">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label clear-padding-row" for="id_scripts_log0">脚本日志文件</label>
              <div class="col-sm-10">
                <input type="text" class="form-control " id="id_scripts_log0" placeholder="脚本日志文件">
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="alterRecord" data-dismiss="modal">提交更改</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal -->
</div>




{% endblock %}

{% block extrajs %}
<!--<script src="{{ url_for('static', filename='bootstrap-table/dist/bootstrap-table.js', _external=True) }}"></script>-->
<!-- put your locale files after bootstrap-table.js -->
<!--<script src="{{ url_for('static', filename='bootstrap-table/dist/locale/bootstrap-table-zh-CN.js', _external=True) }}"></script>-->
<!--<script src="{{ url_for('static', filename='js/scripts_table.js', _external=True) }}"></script>-->
{% endblock %}